[ENG-9818] - collection search with shtrove#970
Open
Vlad0n20 wants to merge 1 commit intoCenterForOpenScience:feature/es2-consolidationfrom
Open
[ENG-9818] - collection search with shtrove#970Vlad0n20 wants to merge 1 commit intoCenterForOpenScience:feature/es2-consolidationfrom
Vlad0n20 wants to merge 1 commit intoCenterForOpenScience:feature/es2-consolidationfrom
Conversation
nsemets
reviewed
Apr 28, 2026
Collaborator
There was a problem hiding this comment.
Remove it. We don't need tests for mapper.
nsemets
reviewed
Apr 28, 2026
| if (!provider || !collectionId || this.defaultSearchFiltersInitialized()) return; | ||
|
|
||
| const collectionIri = `${this.environment.apiDomainUrl}/v2/collections/${collectionId}/`; | ||
| // TODO(ENG-9818): verify 'isContainedBy' property path against shtrove API before shipping |
| providerId = signal<string>(''); | ||
| defaultSearchFiltersInitialized = signal(false); | ||
|
|
||
| readonly useShtrovSearch: boolean = this.environment.collectionSubmissionWithCedar; |
Collaborator
There was a problem hiding this comment.
Fix the name because it is incorrect. shareTrove
Collaborator
There was a problem hiding this comment.
Suggested change
| readonly useShtrovSearch: boolean = this.environment.collectionSubmissionWithCedar; | |
| readonly useShtrovSearch = this.environment.collectionSubmissionWithCedar; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
collectionSubmissionWithCedar(environment config)Purpose
When the
collectionSubmissionWithCedarfeature flag is active, switch the collection discover page (/collections/<id>/discover) from the legacy OSF v2 search API to the shtrove API (/trove/index-card-search), reusing the sharedGlobalSearchComponentalready used by preprint, registry, and institution search pages. If the collection provider has arequired_metadata_template, derive additional filter facets from that CEDAR template's fields and append them to the search filter panel.Summary of Changes
global-searchstoreSetExtraFiltersaction andextraFilters: DiscoverableFilter[]state field (default[])updateResourcesStatenow merges API-returned filters withextraFilters, deduplicating by key — extra filters survive repeatedFetchResourcescallsResetSearchStateclearsextraFilters(included inGLOBAL_SEARCH_STATE_DEFAULTS)CedarTemplateFilterMapper(new —src/app/shared/mappers/filters/)fromTemplate(template: CedarTemplate): DiscoverableFilter[]_ui.order, skips fields with blank/missing labels, maps each to aDiscoverableFilterwithoperator: AnyOfCollectionsDiscoverComponentenvironment.collectionSubmissionWithCedaronce at construction asreadonly useShtrovSearchSetDefaultFilterValue('isContainedBy', apiDomainUrl/v2/collections/<id>/)to scope trove results to the collection; if provider hasrequiredMetadataTemplate, maps its fields viaCedarTemplateFilterMapperand dispatchesSetExtraFilters@if (useShtrovSearch)renders<osf-global-search [searchControlInput]="searchControl" />(guarded bydefaultSearchFiltersInitialized);@elsekeeps existing<osf-collections-main-content />getCollectionDetails, URL query sync, debounced search binding) are skipped in shtrove modeclearCollections; additionally callsresetSearchStatein shtrove modesetupEffects()into focused private methods (setupBrandingEffect,setupShtrovSearchEffect,setupCollectionDetailsEffect,setupUrlSyncEffect,setupLegacySearchEffect)Screenshot(s)
Side Effects
QA Notes
QA Notes